package day04;
import java.util.Scanner;


public class WhileDemo {
    public static void main(String[] args) {
       /* int num=1;
        while(num<6){
            System.out.println("大傻货");
            num++;
        }
        int bull=0;
        while(bull<100){
            System.out.println("99乘法表");
            bull+=3;
        }
        System.out.println("请继续执行");
      int times=1;
      while(times<6){
          System.out.println("行动是成功的阶梯");
          times++;
      }
      int i=1;
      while(i<10){
          System.out.println(i+"*9="+i*9);
          i++;
      }
      int d=1;
      while(d<10) {
          System.out.println(d + "*9=" + d * 9);
          d += 2;
      }
     /*               d=1
     ture  输出 1*9=9; d=3
     ture  输出 3*9=27；d=5
     ture  输出 5*9=35；d=7
     ture  输出 7*9=63；d=9
     ture  输出 9*9=81；d=11
     false 结束

        Scanner scan=new Scanner(System.in);
        int bos=(int)(Math.random()*100+1);
        System.out.println(bos);
        System.out.println("猜吧");
        int guss=scan.nextInt();
        while(guss!=bos){
            if(guss>bos){
                System.out.println("猜大了");
            }else{
                System.out.println("猜小了");
            }
            guss=scan.nextInt();
        }
        System.out.println("恭喜猜对了");

        Scanner scan=new Scanner(System.in);
int boy=(int)(Math.random()*1000+1);
int girl = scan.nextInt();

do{System.out.println("猜吧");
int girl = scan.nextInt();

  if(girl>boy){
System.out.println("猜大了");
 }else if(girl<boy){
System.out.println("猜小了");
 }else{
System.out.println("恭喜猜对");
}
girl=scan.nextInt();
}while(boy!=girl);
        Scanner scan=new Scanner(System.in);
        System.out.println("请选功能：1 存款，2 取款，3 查询余额，4 退卡");
        int dull= scan.nextInt();
        switch(dull){
            case 1:
                System.out.println("取款业务");
                break;
            case 2:
                System.out.println("取款业务");
                break;
            case 3:
                System.out.println("查询余额");
                break;
                case 4:
                System.out.println("退卡");
                break;
            default:
                System.out.println("输入错误");

        }*/
     Scanner scan=new Scanner(System.in);
     int age=(int)(Math.random()*1000+1);
     System.out.println(age);
        int sugge;
        System.out.println("猜吧");
     do{
         sugge= scan.nextInt();
         if(age>sugge){
             System.out.println("猜小了");
         }else if(age<sugge){
             System.out.println("猜大了");
         }else{
             System.out.println("猜对了");
         }
     }
     while(sugge!=age);







    }
}
